
public class Main {
    public static void main(String[] args) {
        MyLinkedList myLinkedList=new MyLinkedList();
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(1);
        //myLinkedList.removeAllKey(1);
        myLinkedList.clear();
        myLinkedList.display();
        System.out.println(myLinkedList.contains(100));
        System.out.println(myLinkedList.contains(3));
        System.out.println(myLinkedList.size());

    }
    public static void main1(String[] args) {
        //TIP Press <shortcut actionId="ShowIntentionActions"/> with your caret at the highlighted text
        // to see how IntelliJ IDEA suggests fixing it.
        SingleLinkedList list = new SingleLinkedList();
        //list.createList();
        /*list.showList();
        list.addLast(2);
        list.addFirst(1);
        list.showList();
        System.out.println("===================");
        list.addLast(2);
        list.showList();
        System.out.println(list.contains(10));
        System.out.println(list.size());
        list.clear();
        list.showList();*/
        //list.createList();
        list.showList();
        System.out.println();
        System.out.println("=============");
        list.addIndex(list.size(), 100);
        list.addIndex(list.size(), 555);
        list.addIndex(list.size(), 300);
        list.addIndex(list.size(), 400);
        list.addIndex(list.size(), 110);
        list.addIndex(list.size(), 600);
        list.showList();
        System.out.println();
        System.out.println("=============");
        //list.head = list.reverseList(list.head);
        /*list.remove(1);
        list.removeAllKey(100);*/
        list.showList();
        System.out.println();
        System.out.println(list.kthToLast(list.head, 2));

        list.head=list.partition(list.head,300);
        list.showList();
    }
}